package com.lyc.constants;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * @Author: lyc
 * @Date: 2024/11/23 上午11:54
 */
public class Constants {

    public static final String ACCOUNT_PATH = "src/main/resources/AAA/";
    public static String KH_TOKEN;

    static {
        loadProperties();
    }

    private static void loadProperties() {
        Properties props = new Properties();
        try (FileInputStream fis = new FileInputStream(new File(ACCOUNT_PATH + "account.properties"))) {
            props.load(fis);

            KH_TOKEN = props.getProperty("KH_TOKEN");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
